package com.example.recycler.webview;

import android.content.Context;
import android.content.Intent;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

/**
 * Created by Administrator on 2017/3/3.
 */

public class intfhtml {
    private Context mContext;

    public intfhtml(Context context) {
        mContext = context;
    }
    @JavascriptInterface
    public void openToast(String text){
        Toast.makeText(mContext, text, Toast.LENGTH_SHORT).show();
    }
    @JavascriptInterface
    public void goToActivity(){
        mContext.startActivity(new Intent(mContext,Main2Activity.class));
    }
}
